package controller.enseignant
{
	import model.Enseignant;
	import model.Formation;
	import model.proxy.EnseignantProxy;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	 
	public class ValiderModifEnseignantCommand extends SimpleCommand 
	{ 
		//public static const NAME : String = 'VALIDER_MODIF_ENSEIGNANT_COMMAND';
		 
		/** 
		 * Constructor 
		 */ 
		public function ValiderModifEnseignantCommand() 
		{ 
			super(); 
		} 
		
		/** 
		 * Initialize all commands/controllers of the application 
		 */
		override public function execute(note : INotification) : void 
		{  
			var enseignant : Enseignant = (note.getBody() as Array)[0] as Enseignant;
			var formation:Formation = (note.getBody() as Array)[1] as Formation;
			var enseignantProxy:EnseignantProxy = facade.retrieveProxy(EnseignantProxy.NAME) as EnseignantProxy;
			enseignantProxy.validerModifEnseignant(enseignant, formation);
		} 
	}
}